﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Code.Models
{
    /// <summary>
    /// 表示管理员的状态
    /// </summary>
    public enum AdminState
    {
        /// <summary>
        /// 正常
        /// </summary>
        Normal=1,
        /// <summary>
        /// 锁定的
        /// </summary>
        Locked=2
    }

    public static class AdminStateEx
    {
        public static string GetName(this AdminState state)
        {
            switch (state)
            { 
                case AdminState.Normal:
                    return "正常";
                case AdminState.Locked:
                    return "锁定";
                default:
                    return state.ToString();
            }
        }
    }
}
